home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / vidtyp14.zip / VIDTYP14.DOC < prev    next >
Text File  |  1990-02-26  |  21KB  |  454 lines

  1.  
  2.  
  3.        VIDTYPE  Ver 1.4     Copyright 1990 by SERVITEK SOFTWARE.
  4.        ________________     All rights reserved.    Revised 02-05-90.
  5.  
  6.  
  7.        If you find this useful, a $5 contribution would be appreciated.
  8.        Please send it to:  CHANGE OF ADDRESS!
  9.  
  10.                         NEW ADDRESS:               (OLD ADDRESS:     )
  11.                         SERVITEK SOFTWARE          (Vince Deegan     )
  12.                         PO BOX 280581              (PO BOX 180114    )
  13.                         Dallas, TX  75228-9181     (Dallas, TX  75218)
  14.  
  15.                                                             Thank you
  16.  
  17.        For local area networks, refer to ORDER.FRM on liscensing fee.
  18.  
  19.  
  20.        VIDTYPE is a utility that detects the type of video adaptor, row
  21.        and column mode, and system (IBM PC/XT/AT/PS2) that you are using
  22.        and automatically sets up DOS environment variables or an
  23.        errorlevel that represents the description of those equipment
  24.        types.  This should work with %100 clones, also.  In a DOS batch
  25.        file, a DOS environment variable can be examined when using the
  26.        IF statement with the % symbol at each end of the variable.  An
  27.        errorlevel can be checked when using the IF and ERRLORLEVEL
  28.        statements.
  29.  
  30.        One good use of VIDTYPE is when you want to run applications that
  31.        give you a selection of video-driver-files or set-files and you
  32.        want to have the necessary video-driver-file or set-file chosen
  33.        automatically before calling the application. In other words, you
  34.        can write a batch file that uses the DOS-batch-language IF
  35.        statement and either the % symbol or ERRORLEVEL statement to
  36.        examine the DOS environment variable and/or errorlevel created by
  37.        VIDTYPE. Then, depending on which IF statement is true, the batch
  38.        file can copy the needed video-driver-file or set-file to the
  39.        default driver-file or set-file used by the application.
  40.  
  41.        In some cases, using a DOS variable can interfere with some DOS
  42.        operations that depend on the use of the DOS environment space.
  43.        If this ever occurs with you, you can choose to refrain from
  44.        using DOS variables and, instead, use an errorlevel to detect the
  45.        type of equipment being used.
  46.  
  47.        Make this choice carefully, though, since the advantage to using
  48.        a DOS variable as opposed to an errorlevel is that it only needs
  49.        to be set once and VIDTYPE only needs to be called once at the
  50.        start-up of your system, within the autoexec.bat file.  The
  51.        errorlevel needs to be checked immediately after VIDTYPE is
  52.        executed requiring VIDTYPE to be called in each batch file that
  53.        determines a video-driver-file or set-file for an application.
  54.        That's not all that bad, but remember also, when using an
  55.        errorlevel, your batch files can become pretty lengthy if you are
  56.        going to test for all of the possible choices of equipment.
  57.  
  58.        The use of DOS variables allows you ways of writing smaller and
  59.        more clever batch files. So my suggestion would be always to
  60.        choose the use of a DOS variable unless you have problems with
  61.        your DOS environment space, such as when using very large batch
  62.        files whose pointers are kept in the DOS environment space or
  63.        when using hardware that isn't hardware-compatible with IBM.
  64.  
  65.  
  66.        Format:  VIDTYPE [-V] [+E] [+S] [+SYS] [+P] [Variable name] [Debug]
  67.  
  68.                 OR   VIDTYPE NP > PRN
  69.                      (Prints help with no pause)
  70.  
  71.         -V :  This option tells the program not to use DOS variables.
  72.               (The default setting is for DOS variables to be used.)
  73.  
  74.         +E :  This option tells the program to set an errorlevel.
  75.  
  76.         +S :  This option will cause VIDTYPE to assign a shorter
  77.               description to the DOS variable (shown in the chart
  78.               displayed in the on-line help).
  79.  
  80.         Variable name :  This is the user-defined name that will be used
  81.                          for the video DOS variable if the -V option
  82.                          isn't used.  When a video DOS variable is used,
  83.                          row and column DOS variables will automatically
  84.                          be created in addition to the video variable.
  85.  
  86.         +SYS :  This option tells the program to include the system
  87.                 variable with its system description.
  88.  
  89.         +P   :  This option tells the program to prompt the user when a
  90.                 CGA adaptor is detected in order to find out whether a
  91.                 multi-color monitor or single-color monitor is hooked
  92.                 up.
  93.  
  94.  
  95.        ========================== SOME EXAMPLES ==========================
  96.  
  97.        -----------------------
  98.        VIDEO-ADAPTOR DETECTION:
  99.        -----------------------
  100.  
  101.        Say you want to call Lotus 123 where the default set-file is
  102.        called 123.SET and your set-file for using a CGA video adaptor is
  103.        called CGACOLOR.SET . . .
  104.  
  105.  
  106.          --------------------------------------------------
  107.          EXAMPLE for using a DOS variable for video adaptor:
  108.          --------------------------------------------------
  109.  
  110.          - Insert a line in your autoexec.bat file which calls VIDTYPE
  111.            in order to set up a DOS environment variable that holds a
  112.            description of the video type:
  113.  
  114.            VIDTYPE VIDEO
  115.  
  116.               VIDTYPE will create a DOS environment variable called
  117.               VIDEO and give it a string value that describes the type
  118.               of video adaptor your system is using, according to the
  119.               VIDTYPE chart.  (Get a printout of the chart by typing
  120.               VIDTYPE NP > PRN.)  It will also create two other DOS
  121.               variables called ROW and COL that give the current number
  122.               of rows and columns being used, respectively.
  123.  
  124.  
  125.          - Now you can write another batch file to use for calling Lotus
  126.            123.
  127.  
  128.            Example:  IF %VIDEO% == CGACOLOR  COPY CGACOLOR.SET 123.SET
  129.                      IF %VIDEO% . . . . . . .
  130.                      IF %VIDEO% . . . . . . .
  131.                      123
  132.  
  133.               This calls Lotus 123 after copying the needed set-file to
  134.               the default set-file.
  135.  
  136.               OR if your application can be called along with the name
  137.               of the desired set-file (or driver-file) you can be more
  138.               clever in your batch file.
  139.  
  140.            Example:  123 %VIDEO%
  141.  
  142.               This calls Lotus 123 and tells it to use the string value
  143.               in the VIDEO variable as the actual set-file name to be
  144.               used. I.e.  If VIDEO has the string value CGACOLOR, Lotus,
  145.               which assumes that the file name has .SET as its
  146.               extension, will use CGACOLOR.SET as its set-file.
  147.  
  148.               NOTE: If the +S option was used, the string would have
  149.               been CGA instead of CGACOLOR.  This could let the variable
  150.               serve as a prefix to a file-name.  I.e.  If you had a
  151.               set-file called CGA123.SET, you could type 123 %VIDEO%123
  152.               which would be translated as 123 CGA123.SET.
  153.  
  154.               NOTE: If you need to know the current row and column mode
  155.               that the system is using, just access the ROW and COL
  156.               variables in the same way you accessed the VIDEO variable;
  157.               i.e.  IF %ROW% == . . . .
  158.                     IF %COL% == . . . .
  159.  
  160.  
  161.          NOTE: I have found that if you are using one of the many DOS
  162.          shell programs available, you may encounter a problem when
  163.          running a batch file that tries to access the DOS variables,
  164.          while in the DOS shell program.  It may not recognize these
  165.          variables as part of the "current" DOS environment since the
  166.          variables are in the "master" environment.  This problem can be
  167.          solved by not running the batch file while in the DOS shell
  168.          program.  Just run it out in plain ole DOS (the "mas